package com.fw.service.persistence.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.fw.service.persistence.dto.ServiceProfile;

public interface ServiceProfileDAO extends JpaRepository<ServiceProfile, Long>, JpaSpecificationExecutor<ServiceProfile> {

    @Query("select distinct t.serviceId from ServiceProfile t order by t.serviceId")
    public List<Object> selectDistinctServiceId();

    @Query("select distinct t.merchantId from ServiceProfile t order by t.merchantId")
    public List<Object> selectDistinctMerchantId();

    @Query("select distinct m.merchantNameEn from ServiceProfile t INNER JOIN t.merchantProfile m order by m.merchantNameEn")
    public List<Object> selectDistinctMerchantName();

    @Query("select distinct m.companyNameEn from ServiceProfile t INNER JOIN t.merchantProfile m order by m.companyNameEn")
    public List<Object> selectDistinctCompanyName();

    @Query("select distinct t.mdr from ServiceProfile t order by t.mdr")
    public List<Object> selectDistinctMdr();

    @Query("select distinct t.serviceFee from ServiceProfile t order by t.serviceFee")
    public List<Object> selectDistinctServiceFee();

    @Query("select distinct t.contact1Name from ServiceProfile t order by t.contact1Name")
    public List<Object> selectDistinctContact1Name();

}
